package com.hkd.cya.状态模式;

public class Student {

    private String stuName;//学生姓名

    private int accountPoints;//初始积分

    private AbstractState state;//状态





    public Student(String stuName) {

        this.stuName = stuName;

        this.accountPoints=0;

        this.state=new BlueState(this);

        System.out.println(this.stuName+"你的初始积分是："+this.accountPoints);

        System.out.println("-------------------------------------");

    }



    public String getStuName() {

        return stuName;

    }



    public int getAccountPoints() {

        return accountPoints;

    }

    public void setAccountPoints(int accountPoints) {

        this.accountPoints = accountPoints;

    }



    public AbstractState getState() {return state;    }

    public void setState(AbstractState state) { this.state = state;    }





    public void playGame(){

        //玩游戏

        //补全代码1
        state.playGame();



    }

    public void study(){

        //增加积分

        //补全代码2
        state.study();



    }

    public void recommend(){

        //推荐保研等

        //补全代码3

        state.recommend();

    }



}